<!DOCTYPE HTML>
<html>
    	<head>
    		<meta charset="UTF-8">
    		<title>index</title>
    		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    		<link rel="shortcut icon" href="images/favicon.png">
    		<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    		<link rel="stylesheet" href="css/main.css">
    		<script>window.$ = window.jQuery = WLJQ;</script>
    	</head>
    	<body style="display: none;">
    		<!--application UI goes here-->
    		<h1>Barcode scanner</h1>
<button type="button" id="scanButton">Scan</button>

<script>
$('#scanButton').bind('click', doScan);

function doScan(){
    cordova.exec(onScanSuccess, onScanFailure, 'BarcodeScanner', 'scan', []);
}

function onScanSuccess(result) {
  alert("We got a barcode\n" +
        "Result: " + result.text + "\n" +
        "Format: " + result.format + "\n" +
        "Cancelled: " + result.cancelled);
}

function onScanFailure(error) {
  alert("Scanning failed: " + error);
}
</script>
    		<script src="js/initOptions.js"></script>
    		<script src="js/main.js"></script>
    		<script src="js/messages.js"></script>
    	</body>
</html>